package org.oslo.mule.transformer;

import org.mule.transformers.AbstractTransformer;
import org.mule.umo.transformer.TransformerException;
import org.oslo.domain.SearchInfo;

/**
 * Transform an incoming query to a string array for the ejb call. 
 * 
 * @author nl24167
 */
public class SessionInfoTransformer extends AbstractTransformer {

	@Override
	protected Object doTransform(Object src, String encoding) throws TransformerException {
		return toStringArray((SearchInfo)src);
	}
	
	private String[] toStringArray(SearchInfo searchInfo) {
		return new String[]{searchInfo.getConferenceName(), searchInfo.getSearchIdentifier()};
	}
}
